package com.bjsxt.pojo;

import java.util.ArrayList;
import java.util.List;

public class CargoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CargoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCargoidIsNull() {
            addCriterion("cargoid is null");
            return (Criteria) this;
        }

        public Criteria andCargoidIsNotNull() {
            addCriterion("cargoid is not null");
            return (Criteria) this;
        }

        public Criteria andCargoidEqualTo(Integer value) {
            addCriterion("cargoid =", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidNotEqualTo(Integer value) {
            addCriterion("cargoid <>", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidGreaterThan(Integer value) {
            addCriterion("cargoid >", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidGreaterThanOrEqualTo(Integer value) {
            addCriterion("cargoid >=", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidLessThan(Integer value) {
            addCriterion("cargoid <", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidLessThanOrEqualTo(Integer value) {
            addCriterion("cargoid <=", value, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidIn(List<Integer> values) {
            addCriterion("cargoid in", values, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidNotIn(List<Integer> values) {
            addCriterion("cargoid not in", values, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidBetween(Integer value1, Integer value2) {
            addCriterion("cargoid between", value1, value2, "cargoid");
            return (Criteria) this;
        }

        public Criteria andCargoidNotBetween(Integer value1, Integer value2) {
            addCriterion("cargoid not between", value1, value2, "cargoid");
            return (Criteria) this;
        }

        public Criteria andStaffidIsNull() {
            addCriterion("staffid is null");
            return (Criteria) this;
        }

        public Criteria andStaffidIsNotNull() {
            addCriterion("staffid is not null");
            return (Criteria) this;
        }

        public Criteria andStaffidEqualTo(Integer value) {
            addCriterion("staffid =", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidNotEqualTo(Integer value) {
            addCriterion("staffid <>", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidGreaterThan(Integer value) {
            addCriterion("staffid >", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidGreaterThanOrEqualTo(Integer value) {
            addCriterion("staffid >=", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidLessThan(Integer value) {
            addCriterion("staffid <", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidLessThanOrEqualTo(Integer value) {
            addCriterion("staffid <=", value, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidIn(List<Integer> values) {
            addCriterion("staffid in", values, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidNotIn(List<Integer> values) {
            addCriterion("staffid not in", values, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidBetween(Integer value1, Integer value2) {
            addCriterion("staffid between", value1, value2, "staffid");
            return (Criteria) this;
        }

        public Criteria andStaffidNotBetween(Integer value1, Integer value2) {
            addCriterion("staffid not between", value1, value2, "staffid");
            return (Criteria) this;
        }

        public Criteria andDrugidIsNull() {
            addCriterion("drugid is null");
            return (Criteria) this;
        }

        public Criteria andDrugidIsNotNull() {
            addCriterion("drugid is not null");
            return (Criteria) this;
        }

        public Criteria andDrugidEqualTo(Integer value) {
            addCriterion("drugid =", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidNotEqualTo(Integer value) {
            addCriterion("drugid <>", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidGreaterThan(Integer value) {
            addCriterion("drugid >", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidGreaterThanOrEqualTo(Integer value) {
            addCriterion("drugid >=", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidLessThan(Integer value) {
            addCriterion("drugid <", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidLessThanOrEqualTo(Integer value) {
            addCriterion("drugid <=", value, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidIn(List<Integer> values) {
            addCriterion("drugid in", values, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidNotIn(List<Integer> values) {
            addCriterion("drugid not in", values, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidBetween(Integer value1, Integer value2) {
            addCriterion("drugid between", value1, value2, "drugid");
            return (Criteria) this;
        }

        public Criteria andDrugidNotBetween(Integer value1, Integer value2) {
            addCriterion("drugid not between", value1, value2, "drugid");
            return (Criteria) this;
        }

        public Criteria andProvideridIsNull() {
            addCriterion("providerid is null");
            return (Criteria) this;
        }

        public Criteria andProvideridIsNotNull() {
            addCriterion("providerid is not null");
            return (Criteria) this;
        }

        public Criteria andProvideridEqualTo(Integer value) {
            addCriterion("providerid =", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridNotEqualTo(Integer value) {
            addCriterion("providerid <>", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridGreaterThan(Integer value) {
            addCriterion("providerid >", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridGreaterThanOrEqualTo(Integer value) {
            addCriterion("providerid >=", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridLessThan(Integer value) {
            addCriterion("providerid <", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridLessThanOrEqualTo(Integer value) {
            addCriterion("providerid <=", value, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridIn(List<Integer> values) {
            addCriterion("providerid in", values, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridNotIn(List<Integer> values) {
            addCriterion("providerid not in", values, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridBetween(Integer value1, Integer value2) {
            addCriterion("providerid between", value1, value2, "providerid");
            return (Criteria) this;
        }

        public Criteria andProvideridNotBetween(Integer value1, Integer value2) {
            addCriterion("providerid not between", value1, value2, "providerid");
            return (Criteria) this;
        }

        public Criteria andCargodateIsNull() {
            addCriterion("cargodate is null");
            return (Criteria) this;
        }

        public Criteria andCargodateIsNotNull() {
            addCriterion("cargodate is not null");
            return (Criteria) this;
        }

        public Criteria andCargodateEqualTo(String value) {
            addCriterion("cargodate =", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateNotEqualTo(String value) {
            addCriterion("cargodate <>", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateGreaterThan(String value) {
            addCriterion("cargodate >", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateGreaterThanOrEqualTo(String value) {
            addCriterion("cargodate >=", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateLessThan(String value) {
            addCriterion("cargodate <", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateLessThanOrEqualTo(String value) {
            addCriterion("cargodate <=", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateLike(String value) {
            addCriterion("cargodate like", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateNotLike(String value) {
            addCriterion("cargodate not like", value, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateIn(List<String> values) {
            addCriterion("cargodate in", values, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateNotIn(List<String> values) {
            addCriterion("cargodate not in", values, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateBetween(String value1, String value2) {
            addCriterion("cargodate between", value1, value2, "cargodate");
            return (Criteria) this;
        }

        public Criteria andCargodateNotBetween(String value1, String value2) {
            addCriterion("cargodate not between", value1, value2, "cargodate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}